package com.jsu.clubmanagementsystem.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsu.clubmanagementsystem.model.entity.Club;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 24753
* @description 针对表【club(社团)】的数据库操作Mapper
* @createDate 2025-05-13 17:19:16
* @Entity com.jsu.clubmanagementsystem.model.entity.Club
*/
public interface ClubMapper extends BaseMapper<Club> {

    @Select("select count(*) from club where tags like #{type}")
    Long getClubType(String type);

    @Select("select clubName from club where id=#{id}")
    String getClubName(Long id);

    @Select("select * from club ${ew.customSqlSegment}")
    List<Club> selectList(Page<Club> page, @Param("ew") Wrapper<Club> queryWrapper);

}




